lib: cpu: Check return value from platform_boot_complete#10326
Conversation
Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities. Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails. This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds error handling for platform_boot_complete() during D3 state exit to improve debugging capabilities. Previously, this function could fail silently, making it difficult to identify issues when the DSP resumed from D3 state with an invalid IPC driver state.
Key Changes:
- Added return value checking for
platform_boot_complete()call - Added error logging and panic trigger when boot completion fails
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| int ret = platform_boot_complete(0); | ||
|
|
||
| if (ret) { |
There was a problem hiding this comment.
[nitpick] The variable ret is declared inside a conditional block. Consider declaring it at the beginning of the function or the encompassing scope to improve code readability and maintain consistency with common C coding practices.
Same as here: #10327 (comment) |
|
@lgirdwood internal CI issue has been resolved. |
Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities.
Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails.
This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior.